#version 450

layout(location = 0) in vec3 in_position;
layout(location = 1) in vec2 in_texcoord;
layout(location = 2) in vec3 in_normal;

out gl_PerVertex
{
    vec4 gl_Position;
};

layout (push_constant) uniform PushConstants
{
    mat4 matrix;
} PC;

out layout(location = 0) vec4 vertexColor;

void main()
{
    gl_Position = PC.matrix * vec4(in_position.x, -in_position.y, in_position.z, 1.f);
    vertexColor = vec4(in_normal.x * 0.5f + 0.5f, in_normal.y * 0.5f + 0.5f, in_normal.z * 0.5f + 0.5f, 1.f);
}